<?php
include_once dirname(__FILE__)."/../config.inc.php";
include_once dirname(__FILE__)."/pOHA.php";
include_once dirname(__FILE__)."/utils.php";
include_once dirname(__FILE__)."/database.php";
include_once dirname(__FILE__)."/constants.php";

class LoggedPage extends HTMLTable
{
    function LoggedPage($title, $bottomPart1, $bottomPart2, $hasColony = true)
    {
        $c = new HTMLTableCell($bottomPart1);
        $row1 = new HTMLTableRow($c);
        
        $c = new HTMLTableCell($bottomPart2);
        $row2 = new HTMLTableRow($c);
        
        $table = new HTMLTable(array($row1, $row2));
        //$table->setAttribute("border", 1);
            
        $cnt = "";
        
        if($hasColony)
        {
            $cnt = $menu;
        }
        else
        {
            $b = new Box("Menu Colonia", "Non hai ancora fondato la tua colonia!");
            $b->setAttribute("height", "182");
            $cnt = $b;
        }
        
        $cell1 = new HTMLTableCell($cnt);
        $cell1->setAttribute("width", "150");
        $cell1->setAttribute("valign", "top");
        
        $cell2 = new HTMLTableCell(new Box($title, $table));
        $cell2->setAttribute("width", "800");
        $cell2->setAttribute("valign", "top");
        
        $row = new HTMLTableRow(array($cell1, $cell2));
        
        parent::HTMLTable($row, '', '', '', 0, 0);
        //$this->setAttribute("border", 1);
    }
}
?>
